﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;
using FwProject.Comm.ExcelUtil;

namespace FwProject.Distribution.Dto
{
    [DisplayName(displayName:"餐厅配送货品统计")]
    public class DistributionTypeNumberReportDto
    {
        [Display(Name = "所属工厂")]
        public Guid FactoryInfoId { get; set; }
        [Display(Name = "餐厅名称")]
        [DisplayName(displayName:"餐厅名称")]
        [ExcelDateMember(IsMultiRow =false,IsMerged =true)]
        public string RestaurantName { get; set; }
        [Display(Name ="司机id")]
        public long DriverId { get; set; }
        [Display(Name = "司机")]
        public string DriverName { get; set; }
        [ExcelDateMember(IsMultiRow = true, IsMerged = false,IsClass =true,ListOne =false)]
        public List<TypeNumberModel> TypeNumberModelList { get; set; }
    }

    public class TypeNumberModel
    {
        [Display(Name = "货品型号")]
        [DisplayName(displayName: "货品型号")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false)]
        public string Name { get; set; }
        /// <summary>
        /// 本次配送箱数
        /// </summary>
        /// <value>The distributioncount.</value>
        [Display(Name = "配送箱数")]
        [DisplayName(displayName: "配送箱数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false,IsSum =true)]
        public int Distributioncount { get; set; } = 0;

        [Display(Name = "配送套数")]
        [DisplayName(displayName: "配送套数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int DistributionNumbercount { get; set; } = 0;

        /// <summary>
        /// 回收
        /// </summary>
        /// <value>The recoverycount.</value>
        [Display(Name = "回收箱数")]
        [DisplayName(displayName: "回收箱数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int Recoverycount { get; set; } = 0;
        [Display(Name = "回收套数")]
        [DisplayName(displayName: "回收套数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int RecoveryNumbercount { get; set; } = 0;



        /// <summary>
        /// 换货
        /// </summary>
        /// <value>The exchangegoodscount.</value>
        [Display(Name = "换货箱数")]
        [DisplayName(displayName: "换货箱数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int Exchangegoodscount { get; set; } = 0;
        [Display(Name = "换货套数")]
        [DisplayName(displayName: "换货套数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int ExchangegoodsNumbercount { get; set; } = 0;


        /// <summary>
        /// 折损
        /// </summary>
        /// <value>The damagecount.</value>
        [Display(Name = "折损")]
        [DisplayName(displayName: "折损套数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int Damagecount { get; set; } = 0;
        /// <summary>
        /// 赠送
        /// </summary>
        /// <value>The givecount.</value>
        [Display(Name = "赠送箱数")]
        [DisplayName(displayName: "赠送箱数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int Givecount { get; set; } = 0;
        [Display(Name = "赠送套数")]
        [DisplayName(displayName: "赠送套数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int GiveNumbercount { get; set; } = 0;

        /// <summary>
        /// 退箱
        /// </summary>
        /// <value>The backboxcount.</value>
        [Display(Name = "退箱")]
        [DisplayName(displayName: "退回箱数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int Backboxcount { get; set; } = 0;
        /// <summary>
        /// 退数
        /// </summary>
        /// <value>The backnumbercount.</value>
        [Display(Name = "退数")]
        [DisplayName(displayName: "退回套数")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public int Backnumbercount { get; set; } = 0;

        [Display(Name = "单价")]
        [DisplayName(displayName: "单价")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false)]
        public decimal Price { get; set; }

        [Display(Name = "金额")]
        [DisplayName(displayName: "金额")]
        [ExcelDateMember(IsMultiRow = true, IsMerged = false, IsSum = true)]
        public decimal Sumprice { get; set; }
    }
}
